const nodemailer = require('nodemailer');

const config = {
    host: 'smtp.qq.com',
    port: 465,
    auth: {
        user: '980142138@qq.com', 
        pass: 'hikuqfqovylrbdhh' 
    }
};

const transporter = nodemailer.createTransport(config);


 

module.exports = function (mail){
    transporter.sendMail(mail, function(error, info){
        if(error) {
            return console.log(error);
        }
        console.log('mail sent:', info.response);
    });
};

 
